package com.library.dao;

import com.library.po.LendList;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface LendListMapper {
    void insertSelective(LendList record);
    //根据id查询
    LendList selectByPrimaryKey(Integer id);
    //更新
    void updateByPrimaryKeySelective(LendList record);
    //根据id更新
    void updateByPrimaryKey(LendList record);
    //查询所有借阅记录
    List<LendList> queryLendListAll(LendList lendList);
    //查询借阅阅时间线（一本书什么时候被借走过）
    List<LendList> queryLookBookList(@Param("rid") Integer rid, @Param("bid") Integer bid);
    //查询当前用户的借阅记录
    List<LendList> queryLendListAll2(LendList lendList);
    //根据图书id查询借阅记录数量
    Integer queryLendListCount(@Param("bookId") Integer bookId);
    //根据读者id查询借阅记录数量
    Integer queryLendListCount2(@Param("readerId") Integer bookId);
}